package com.lyj.mode.decorator;

/**
 * 测试类
 * @author:liyajie
 * @createTime:2022/2/25 14:47
 * @version:1.0
 */
public class Test {
    public static void main(String[] args) {
        // 点了一杯卡布奇诺，还加了一份热牛奶
        Coffee coffee = new Cappuccino();
        System.out.println(coffee.getDesc());
        //System.out.println(coffee.getPrice());
        System.out.println(coffee.cost());;

        HotMilk hotMilk = new HotMilk(coffee);
        System.out.println(hotMilk.getDesc());
        //System.out.println(hotMilk.getPrice());
        System.out.println(hotMilk.cost());
    }
}
